<%@ page import="auctionhausen.Listing" %>



<div class="fieldcontain ${hasErrors(bean: bidInstance, field: 'amount', 'error')} required">
	<label for="amount">
		<g:message code="bid.amount.label" default="Amount" />
		<span class="required-indicator">*</span>
	</label>
	<g:if test="${listingInstance?.bids}">
		<g:field id="bidSelector" type="number" step="0.5" name="amount" required="" value="${listingInstance?.bids?.last().amount + 0.50F}"/>
	</g:if>
	<g:else>
		<g:field id="bidSelector" type="number" step="0.5" name="amount" required="" value="${listingInstance?.startingPrice+ 0.50F}"/>
	</g:else>
</div>

<div class="fieldcontain ${hasErrors(bean: bidInstance, field: 'listing', 'error')} required">
	<g:hiddenField name="bidder.id" id="listing" value="${session.user?.id}" />
	<g:hiddenField name="listing.id" id="listing" value="${listingInstance?.id}" />
</div>

